package com.blindbugs.boletus;

import android.view.MotionEvent;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;


public class BoletusActionOverlay extends com.google.android.maps.Overlay{
	OnMapTouchListener listener=null;
	public void setOnMapTouchListener(OnMapTouchListener listener)
	{
		this.listener=listener;
	}
	
	   @Override
       public boolean onTouchEvent(MotionEvent event, MapView mapView) 
       {   
           //---when user lifts his finger---
           if (event.getAction() == 1) {                
               GeoPoint p = mapView.getProjection().fromPixels(
                   (int) event.getX(),
                   (int) event.getY());
               if (listener!=null) listener.OnMapTouch(p);
           }
           return false;
       }        
}


